import Layout from '@/views/layout/Layout'

export default [
  {
    path: '/bank',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'bank',
    meta: {
      title: '银行管理',
      icon: 'chart'
    },
    children: [
      {
        path: 'bank',
        component: () => import('@/views/bank/bank'),
        name: 'bank',
        meta: {
          perms: [1],
          title: '银行编码',
          noCache: true
        }
      },
      {
        path: 'unionno',
        component: () => import('@/views/bank/unionno'),
        name: 'unionno',
        meta: {
          perms: [1],
          title: '银行联行号管理',
          noCache: true
        }
      }, {
        path: 'cardbin',
        component: () => import('@/views/bank/cardbin'),
        name: 'cardbin',
        meta: {
          perms: [1],
          title: '银行卡BIN管理',
          noCache: true
        }
      }, {
        path: 'account',
        component: () => import('@/views/bank/account'),
        name: 'account',
        meta: {
          perms: [1],
          title: '账户管理',
          noCache: true
        }
      }
    ]
  },
  {
    path: 'channel',
    component: Layout,
    redirect: 'channel',
    // redirect: 'noredirect',
    name: "channel",
    meta: {
      title: '渠道管理',
      // icon: 'chart'
      // perms: [0,1],
    },
    children: [
      {
        path: '/channel',
        component: () => import('@/views/channel/channel'),
        name: 'channel',
        meta: {perms: [1], title: '渠道管理', noCache: true}
      },
      {
        path: '/channelAcc',
        component: () => import('@/views/channel/channelAcc.vue'),
        name: 'channelAcc',
        meta: {perms: [1], title: '渠道费用列表', icon: 'chart', noCache: true},
        hidden: true
      },
      {
        path: '/feedetail',
        component: () => import('@/views/channel/feedetail.vue'),
        name: 'feedetail',
        meta: {perms: [1], title: '明细列表', icon: 'chart', noCache: true},
        hidden: true
      }
    ]
  },
  {
    path: '/account',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'account',
    meta: {
      title: '保险代理管理',
      icon: 'chart',
      //perms: []
    },
    children: [
      {
        path: 'corporate',
        component: () => import('@/views/action/corporate'),
        name: 'corporate',
        meta: {
          perms: [5,7],
          title: '公司信息',
          noCache: true
        }
      },
      {
        path: 'agentman',
        component: () => import('@/views/account/agentman'),
        name: 'agentman',
        meta: {
          perms: [5],
          title: '代理人信息管理',
          noCache: true
        }
      },
      {
        path: 'accsearch',
        component: () => import('@/views/account/accsearch'),
        name: 'accsearch',
        meta: {
          perms: [5, 7],
          title: '共管账户余额和流水查询',
          noCache: true
        }
      },
      {
        path: 'bdagentfee',
        component: () => import('@/views/account/bdagentfee'),
        name: 'bdagentfee',
        meta: {
          perms: [5],
          title: '代理人手续费垫资管理',
          noCache: true
        }
      },
      {
        path: 'blagentfee',
        component: () => import('@/views/account/blagentfee.vue'),
        name: 'blagentfee',
        meta: {
          perms: [6],
          title: '垫资回款管理',
          noCache: true
        }
      },
      {
        path: 'bxagentfee',
        component: () => import('@/views/account/bxagentfee'),
        name: 'bxagentfee',
        meta: {
          perms: [4],
          title: '代理人手续费列表管理',
          noCache: true
        }
      },
      {
        path: 'balance',
        component: () => import('@/views/account/balance'),
        name: 'balance',
        meta: {
          perms: [1],
          title: '账户余额查询',
          noCache: true
        }
      }, {
        path: 'bankserial',
        component: () => import('@/views/account/bankserial'),
        name: 'bankserial',
        meta: {
          perms: [1],
          title: '账户明细查询',
          noCache: true
        }
      }, {
        path: 'agentsearch',
        component: () => import('@/views/correlation/agentsearch'),
        name: 'agentsearch',
        meta: {
          perms: [6],
          title: '代理人信息查询',
          noCache: true
        }
      },{
        path: 'subagentfee',
        component: () => import('@/views/account/subagentfee'),
        name: 'subagentfee',
        meta: {
          perms: [5,7],
          title: '子公司垫资查询',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/service',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'service',
    meta: {
      title: '权益服务管理',
      icon: 'chart',
    },
    children: [
      {
        path: 'serviceman',
        component: () => import('@/views/service/serviceman.vue'),
        name: 'serviceman',
        meta: {
          perms: [7],
          title: '小权益服务商信息管理',
          noCache: true
        }
      },
      {
        path: 'qyservicefee',
        component: () => import('@/views/service/qyservicefee'),
        name: 'qyservicefee',
        meta: {
          perms: [7],
          title: '权益服务费垫资管理',
          noCache: true
        }
      },
      {
        path: 'bxservicefee',
        component: () => import('@/views/service/bxservicefee'),
        name: 'bxservicefee',
        meta: {
          perms: [4],
          title: '权益服务商费用列表管理',
          noCache: true
        }
      },
      {
        path: 'servicesearch',
        component: () => import('@/views/service/servicesearch'),
        name: 'servicesearch',
        meta: {
          perms: [6],
          title: '小权益服务商信息查询',
          noCache: true
        }
      },
    ]
  },
  {
    path: '/action',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'action',
    meta: {
      title: '付款查询',
      icon: 'chart',
      perms: [4]
    },
    children: [
      {
        path: 'repaysearch',
        component: () => import('@/views/action/repaysearch'),
        name: 'repaysearch',
        meta: {
          perms: [4],
          title: '支付流水查询',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/correlation',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'correlation',
    meta: {
      title: '三方关联查询',
      icon: 'chart',
      perms: [1, 4, 5, 6, 7]
    },
    children: [
      {
        path: 'correlation',
        component: () => import('@/views/correlation/correlation'),
        name: 'correlation',
        meta: {
          perms: [1],
          title: '三方关联信息管理',
          noCache: true
        }
      }, {
        path: 'corrsearch',
        component: () => import('@/views/correlation/corrsearch'),
        name: 'corrsearch',
        meta: {
          perms: [4, 5, 6, 7],
          title: '三方关联信息查询',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/insurance',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'insurance',
    meta: {
      title: '公司管理',
      icon: 'chart',
    },
    children: [
      {
        path: 'insurance',
        component: () => import('@/views/insurance/insurance'),
        name: 'insurance',
        meta: {
          perms: [1],
          title: '保险公司信息管理',
          noCache: true
        }
      }, {
        path: 'insuragent',
        component: () => import('@/views/insurance/insuragent'),
        name: 'insuragent',
        meta: {
          perms: [1],
          title: '保代公司信息管理',
          noCache: true
        }
      }, {
        path: 'factoring',
        component: () => import('@/views/insurance/factoring'),
        name: 'factoring',
        meta: {
          perms: [1],
          title: '保理公司信息管理',
          noCache: true
        }
      },{
        path: 'insurservice',
        component: () => import('@/views/service/insurservice'),
        name: 'insurservice',
        meta: {
          perms: [1],
          title: '权益服务商信息管理',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/sys',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'sys',
    meta: {
      title: '系统管理',
      icon: 'chart',
    },
    children: [
      {
        path: 'syslog',
        component: () => import('@/views/sys/syslog'),
        name: 'syslog',
        meta: {
          perms: [3],
          title: '系统日志管理',
          noCache: true
        }
      },
      {
        path: 'user',
        component: () => import('@/views/sys/user'),
        name: 'user',
        meta: {
          perms: [1],
          title: '用户管理',
          noCache: true
        }
      },
      {
        path: 'config',
        component: () => import('@/views/sys/config'),
        name: 'config',
        meta: {
          perms: [1],
          title: '系统参数设置',
          noCache: true
        }
      },
      {
        path: 'inmsg',
        component: () => import('@/views/sys/inmsg'),
        name: 'inmsg',
        meta: {
          perms: [5, 6, 7],
          title: '通知与异常信息',
          noCache: true
        }
      }
    ]
  },
  {
    path: '/stat',
    component: Layout,
    redirect: 'noredirect',
    alwaysShow: true,
    name: 'stat',
    meta: {
      title: '查询与统计',
      icon: 'chart',
    },
    children: [
      {
        path: 'statistics',
        component: () => import('@/views/stat/statistics'),
        name: 'statistics',
        meta: {
          perms: [1],
          title: '共管账户列表查询',
          noCache: true
        }
      },
      {
        path: '/bankserial',
        component: () => import('@/views/stat/bankserial.vue'),
        name: 'bankserial',
        meta: {perms: [1], title: '银行流水', icon: 'chart', noCache: true},
        hidden: true
      },
      {
        path: '/platformserial',
        component: () => import('@/views/stat/platformserial.vue'),
        name: 'platformserial',
        meta: {perms: [1], title: '业务操作记录', icon: 'chart', noCache: true},
        hidden: true
      },
      {
        path: 'feeList',
        component: () => import('@/views/stat/feeList'),
        name: 'feeList',
        meta: {
          perms: [1],
          title: '保险公司手续费列表查询',
          noCache: true
        }
      },
      {
        path: 'bxMoneyback',
        component: () => import('@/views/stat/bxMoneyback'),
        name: 'bxMoneyback',
        meta: {
          perms: [1],
          title: '保险公司回款分账查询',
          noCache: true
        }
      },
      {
        path: 'dvance',
        component: () => import('@/views/stat/dvance'),
        name: 'dvance',
        meta: {
          perms: [1],
          title: '保代/权益垫资列表查询',
          noCache: true
        }
      },
      {
        path: 'bdMoneyBack',
        component: () => import('@/views/stat/bdMoneyBack'),
        name: 'bdMoneyBack',
        meta: {
          perms: [1],
          title: '保代/权益回款余额查询',
          noCache: true
        }
      },
      {
        path: 'biList',
        component: () => import('@/views/stat/biList'),
        name: 'biList',
        meta: {
          perms: [1],
          title: '保理公司垫资回款查询',
          noCache: true
        }
      },
      {
        path: 'getAllFee',
        component: () => import('@/views/stat/getAllFee'),
        name: 'getAllFee',
        meta: {
          perms: [1, 4, 5, 6, 7],
          title: '未回款垫资查询',
          noCache: true
        }
      },
      {
        path: 'statis',
        component: () => import('@/views/stat/statis'),
        name: 'statis',
        meta: {
          perms: [1, 4, 5, 6, 7],
          title: '垫资利息费历史统计',
          noCache: true
        }
      },
      {
        path: 'history',
        component: () => import('@/views/stat/history'),
        name: 'history',
        meta: {
          perms: [1, 4, 5, 6, 7],
          title: '垫资历史统计',
          noCache: true
        }
      },
    ]
  }
]
